﻿<Window x:Class="DTC.Popups.IssueFormPopup"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Valid="clr-namespace:DTC.Validations"
        Title="Форма выпуска" Height="431" Width="321"
        Style="{StaticResource PopupWindow}"
        Closing="Window_Closing"
        Loaded="Window_Loaded">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/TextBlockStyles.xaml"/>
                <ResourceDictionary Source="../Resources/TextEditStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <StackPanel Name="MainGrid" Margin="20" VerticalAlignment="Center">
        <TextBlock Text="Название формы выпуска:"/>
        <TextBox Name="IssueFormTextBox"
                 SnapsToDevicePixels="True"
                 Margin="5,10,5,0"
                 >
            <TextBox.Text>
                <Binding Path="Name">
                    <Binding.ValidationRules>
                        <Valid:EmptyValidate/>
                    </Binding.ValidationRules>
                </Binding>
            </TextBox.Text>
        </TextBox>
        <TextBlock Margin="0,20,0,0" Text="Единица измерения:"/>
        <TextBox Margin="5,10,5,0" Text="{Binding MesaureUnitName}"
                 SnapsToDevicePixels="True"/>
        <TextBlock Margin="0,20,0,0" Text="Обозначение единицы измерения:"/>
        <TextBox Margin="5,10,5,0"
                 SnapsToDevicePixels="True">
            <TextBox.Text>
                <Binding Path="MesaureUnitAcronym">
                    <Binding.ValidationRules>
                        <Valid:EmptyValidate/>
                    </Binding.ValidationRules>
                </Binding>
            </TextBox.Text>
        </TextBox>
        <CheckBox IsChecked="{Binding IsDiscret}"
                      Margin="5,20,5,0">
            Дискретно
        </CheckBox>
    </StackPanel>
</Window>
